package cn.zz.veggie.model.domain;

import cn.zz.comm.mybaits.types.BaseEntity;
import cn.zz.comm.util.DateUtil;
import cn.zz.veggie.model.enums.ShopStatus;
import lombok.Getter;
import lombok.Setter;

/**
 * 门店(Shop)实体类
 *
 * @author zhongq
 * @since 2024-07-26 22:33:08
 */
@Getter
@Setter
public class Shop extends BaseEntity {

	private String name;
	private String address;
	private String mobile;
	private Integer status;

	public void delete() {
		this.status = ShopStatus.deleted.status;
		this.updatedAt = DateUtil.getCurTimeSec();
	}

	public boolean checkIsDelete() {
		return ShopStatus.match(ShopStatus.deleted, status);
	}
}